import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qf.domain.User;
import com.qf.service.UserService;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class testSpring {
    @Test
    public void TestSpring(){

        PageHelper.startPage(1,3);
        ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("spring-mybatis.xml");
        UserService userService = ac.getBean(UserService.class);
        List<User> userList = userService.findUserList();
        PageInfo<User> pageInfo = new PageInfo<>(userList);
        System.out.println(pageInfo);
    }
}
